home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / datatypes / binarydt / install < prev    next >
Text File  |  1996-04-07  |  3KB  |  131 lines

  1. ;
  2. ; $PROJECT: binary.datatype
  3. ;
  4. ; $VER: Install 39.3 (19.03.95)
  5. ;
  6. ; by
  7. ;
  8. ; Stefan Ruppert , Windthorststraße 5 , 65439 Flörsheim , GERMANY
  9. ;
  10. ; (C) Copyright 1994,1995
  11. ; All Rights Reserved !
  12. ;
  13.  
  14. (set cpu (database "cpu"))
  15.  
  16. (set #datatype      (cat "binary.datatype"))
  17. (set #datatype-desc (cat "BINARY"))
  18.  
  19. (set mode
  20.       (askchoice
  21.             (prompt @app-name)
  22.             (help @askchoice-help)
  23.             (choices "Install" "Remove")
  24.       )
  25. )
  26.  
  27. (if mode
  28.           (set pmode "Remove")
  29.           (set pmode "Install")
  30. )
  31.  
  32. ; get classes dir
  33. (set classdir
  34.           (askdir
  35.                      (prompt "Where do the Classes belong")
  36.                      (help @askdir-help)
  37.                      (default "SYS:Classes")
  38.           )
  39. )
  40.  
  41. ; now do install or remove
  42. (if mode
  43.           ; Remove
  44.           (
  45.                      ; Show what we are doing
  46.                      (working "Removing " @app-name)
  47.  
  48.                      ; Remove the non-standard pieces
  49.                      (delete (tackon classdir "datatypes" #datatype))
  50.                      (delete (cat "devs:datatypes/" #datatype-desc) (infos))
  51.  
  52.                      ; Don't want to use the confusing "Installation Complete" message
  53.                      ; when what we really did was remove things...
  54.                      (message "The \"" @app-name "\" components "
  55.                                  "that you specified have been successfully removed")
  56.                      (exit (quiet))
  57.           )
  58.  
  59.           ; Install
  60.           (
  61.                      (working "Installing " @app-name)
  62.  
  63.                      (set #dtname (tackon "classes/datatypes" #datatype))
  64.  
  65.                      ; Install the classes
  66.                      (if (OR (= cpu "68000") (= cpu "68010"))
  67.                           (run (cat "copy >NIL: " #dtname ".000 t:" #datatype))
  68.                           (run (cat "copy >NIL: " #dtname ".020 T:" #datatype))
  69.                      )
  70.  
  71.                      ; Install the classes
  72.                      (copylib
  73.                                 (prompt (cat "Copying " @app-name))
  74.                                 (help @copylib-help)
  75.                                 (source (tackon "t:" #datatype))
  76.                                 (dest (tackon classdir "DataTypes"))
  77.                                 (confirm)
  78.                      )
  79.  
  80.                      (run (cat "delete >NIL: t:" #datatype))
  81.  
  82.                      ; Install the descriptors
  83.                      (copyfiles
  84.                                 (prompt "Copying the Descriptors")
  85.                                 (help @copyfiles-help)
  86.                                 (source "devs/datatypes")
  87.                                 (dest "DEVS:DataTypes")
  88.                                 (pattern "#?")
  89.                                 (infos)
  90.                                 (confirm)
  91.                      )
  92.  
  93.                      ; install include file
  94.                      (copyfiles
  95.                                 (prompt "Copying include file")
  96.                                 (help @copyfiles-help)
  97.                                 (source "include")
  98.                                 (dest "include:")
  99.                                 (pattern "#?")
  100.                                 (confirm)
  101.                      )
  102.  
  103.                      ; install doc file
  104.                      (copyfiles
  105.                                 (prompt "Copying autodoc file")
  106.                                 (help @copyfiles-help)
  107.                                 (source "doc")
  108.                                 (dest "AutoDocs:")
  109.                                 (pattern "#?")
  110.                                 (confirm)
  111.                      )
  112.  
  113.                      ; install AmigaGuide file
  114.                      (copyfiles
  115.                                 (prompt "Copying AmigaGuide file")
  116.                                 (help @copyfiles-help)
  117.                                 (source "help")
  118.                                 (dest "AmigaGuide:")
  119.                                 (pattern "#?")
  120.                                 (confirm)
  121.                      )
  122.  
  123.                      ; Tell the system about the new descriptors
  124.                      (run "C:AddDataTypes Refresh")
  125.  
  126.           )
  127. )
  128.  
  129. (set @default-dest classdir)
  130.  
  131.